package com.vegetable.modules.entity.allocation;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 分配扣款明细表
 * </p>
 *
 * @author Qoder
 * @since 2025-11-04
 */
@Data
@TableName("allocation_deduction_detail")
@ApiModel(value="AllocationDeductionDetail对象", description="分配扣款明细表")
public class AllocationDeductionDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "分配回款明细ID")
    private Long collectionDetailId;

    @ApiModelProperty(value = "代办人ID")
    private Long agentId;

    @ApiModelProperty(value = "代办人名称")
    private String agentName;

    @ApiModelProperty(value = "商品ID")
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "规格ID")
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "扣款金额")
    private BigDecimal deductionAmount;

    @ApiModelProperty(value = "销售出库单ID")
    private Long salesOutId;

    @ApiModelProperty(value = "销售出库单号")
    private String salesOutDocNo;

    @ApiModelProperty(value = "订单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date orderTime;

    @ApiModelProperty(value = "单据编号")
    private String storageOrderNo;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}